-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correctly configure R for BLAS/LAPACK & check configure output #1292
Conversation
|
||
# make sure correct config script is used for Tcl/Tk | ||
for dep in ['Tcl', 'Tk']: | ||
root = get_software_root(dep) | ||
if root: | ||
dep_config = os.path.join(root, 'lib', '%sConfig.sh' % dep.lower()) | ||
self.cfg.update('configopts', '-with-%s-config=%s' % (dep.lower(), dep_config)) | ||
self.cfg.update('configopts', '--with-%s-config=%s' % (dep.lower(), dep_config)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nasty typo here, this went undetected because the existing R easyconfigs already include --with-tcl-config
and --with-tk-config
in configopts
...
# define $BLAS_LIBS to build R correctly against BLAS/LAPACK library | ||
# $LAPACK_LIBS should *not* be specified since that may lead to using generic LAPACK | ||
# see https://github.com/easybuilders/easybuild-easyconfigs/issues/1435 | ||
env.setvar('BLAS_LIBS', os.getenv('LIBBLAS_MT')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using $LIBBLAS_MT
here, while existing R easyconfigs use $LIBBLAS
.
This matter mainly when using Intel MKL, i.e. multithreaded vs sequential, see also the discussion in #202.
We could/should make this configurable, and stick to linking with the sequential BLAS library by default?
R is currently not being configured correctly, see easybuilders/easybuild-easyconfigs#1435 and also easybuilders/easybuild-easyconfigs#4773.
If
LAPACK_LIBS
is defined inpreconfigopts
, R reports that LAPACK is being builtgeneric
, which seems wrong (although it may be OK for LAPACK, since there are no tuned LAPACK libraries, all the tuning is done in the BLAS library afaik).This change only defines
$BLAS_LIBS
in the environment, and checks the output of the configure command to make sure that BLAS/LAPACK is i) used, ii) correctly configured (i.e. nogeneric
).The R easyconfigs (in particular the recent easybuilders/easybuild-easyconfigs#5090 and easybuilders/easybuild-easyconfigs#5360) will need to be modified as well, since they now hard set
LAPACK_LIBS
viapreconfigopts
, which leads toLAPACK(generic)
being reported.That's a bit of a catch-22 situation though, since removing
preconfigpts
part and not including--with-blas --with-lapack
in the easyconfig files requires that this updated easyblock is used, otherwise R gets (sliently) built without BLAS/LAPACK...